Well-Founded Sized Types in the Calculus of (Co)Inductive Constructions

نویسنده

  • Jorge Luis Sacchini
چکیده

Type-based termination is a mechanism for ensuring termination and productivity of (co)recursive definitions [4]. Its main feature is the use of sized types (i.e. types annotated with size information) to track the size of arguments in (co)recursive calls. Termination of recursive function (and productivity of corecursive functions) is ensured by restricting recursive calls to smaller arguments (as evidenced by their types). Type-based approaches to termination and productivity have several advantages over the syntactic-based approaches currently implemented in Coq and Agda [5, 1, 2]. In particular, they are more expressive and easier to understand. In previous work [6, 5], we studied the metatheory of extensions of the Calculus of (Co)Inductive Constructions (CIC) with a simple notion of sized types. While these systems are more expressive than the guard predicates of Coq, there have two main shortcomings in the case of coinductive types. First, corecursive definitions that use tail are not expressible, e.g.: corec zeroes := cons(0, cons(0, tail zeroes)). Second, Subject Reduction (SR) does not hold (a well-known problem in Coq that was observed by Gimnez [3]). While in practice, the lack of SR does not seem to be a major issue, it is theoretically unsatisfying. In this work, we consider an extension of CIC with a notion of well-founded sized types, inspired by F ω [2], that solves both issues. As in previous work, (co)inductive types are annotated with size expressions taken from the size algebra given by s ::= ı | s+ 1 | ∞, where ı is a size variable. In this approach, the (simplified) typing rule for streams looks like:

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Rooster and the Syntactic Bracket

We propose an extension of pure type systems with an algebraic presentation of inductive and co-inductive type families with proper indices. This type theory supports coercions toward from smaller sorts to bigger sorts via explicit type construction, as well as impredicative sorts. Type families in impredicative sorts are constructed with a bracketing operation. The necessary restrictions of pa...

متن کامل

Cumulative Inductive Types In Coq

In order to avoid well-know paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type0 : Type1 : · · · . Such type systems are called cumulative if for any type A we have that A : Typei implies A : Typei+1. The Predicative Calculus of Inductive Constructions (pCIC...

متن کامل

Consistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)

In order to avoid well-know paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type0 : Type1 : · · · . Such type systems are called cumulative if for any type A we have that A : Typei implies A : Typei+1. The predicative calculus of inductive constructions (pCIC...

متن کامل

Constructor Subtyping in the Calculus of Inductive Constructions

The Calculus of Inductive Constructions (CIC) is a powerful type system, featuring dependent types and inductive deenitions, that forms the basis of proof-assistant systems such as Coq and Lego. We extend CIC with constructor subtyping, a basic form of subtyping in which an inductive type is viewed as a subtype of another inductive type if has more elements than. It is shown that the calculus i...

متن کامل

Extracting Purely Functional Contents from Logical Inductive Types

We propose a method to extract purely functional contents from logical inductive types in the context of the Calculus of Inductive Constructions. This method is based on a mode consistency analysis, which veri es if a computation is possible w.r.t. the selected inputs/outputs, and the code generation itself. We prove that this extraction is sound w.r.t. the Calculus of Inductive Constructions. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015